<template> 
  <div>
    <button @click="isShow = !isShow">点我切换隐藏/显示</button>
    <Demo v-if="isShow"></Demo>
    <hr> 
  </div> 
</template>

<script>  
import {ref} from 'vue'
import Demo from './components/Demo' 
export default {
  name: 'App',   
  components:{Demo}, 
  setup() {
    let isShow = ref(true)
    return {isShow}
  }
}
</script>

